package de.gbeine.java.depview.ui.controller;

import com.google.common.eventbus.Subscribe;

import de.gbeine.java.depview.event.SelectElementEvent;

public class InformationPanelController {

    private final InformationPanel informationPanel;

    /**
     *
     * @param pInformationPanel
     */
    public InformationPanelController(final InformationPanel pInformationPanel) {
        this.informationPanel = pInformationPanel;
    }

    /**
     *
     * @param pEvent
     */
    @Subscribe
    public void onSelectElementEvent(final SelectElementEvent pEvent) {
        this.informationPanel.setElement(pEvent.getSelectedElement());
    }


}
